{{#hasDelegatedBodyField}}
    /**
    * Serialize this value to JSON.
    */
    @Override
    public void serialize({{TYPES.Jakarta.Json.Stream.JsonGenerator}} generator, {{TYPES.Client.Json.JsonpMapper}} mapper) {
        {{#delegatedBodyField.type.serializer}}this.{{delegatedBodyField.name}}{{/delegatedBodyField.type.serializer}}
    }
{{/hasDelegatedBodyField}}
{{^hasDelegatedBodyField}}
    {{>ObjectShape/Serialize}}
{{/hasDelegatedBodyField}}